/*
 * @Author: huangrongji
 * @Date: 2021-11-27 10:18:28
 * @LastEditors: huangrongji
 * @LastEditTime: 2021-11-28 23:14:04
 * @Description: file content
 */
import Vue from 'vue';
let vm = new Vue();
const { http } = uni.$u;
   let baseUrl = process.env.VUE_APP_BASE_URL,
    cdnUrl = process.env.VUE_APP_CDN_URL;
if (process.env.VUE_APP_PLATFORM === 'mp-weixin') {
  baseUrl = process.env.VUE_APP_BASE_API,
  cdnUrl = 'https://repair-1259727252.file.myqcloud.com';
}

// 获取菜单
export const fetchMenu = (params, config = {}) => {
  return http.post('/ebapi/public_api/index', params, config)
}

//  获取报修页子问题的接口
export const getRepairClass = (type) => {
  return http.get(baseUrl + `/order-repair/type/${type}`)
}

export const getSwiperList = () => {
	return http.get(cdnUrl + '/lbt.json')
}

export const getQuestionSwiperList = () =>{
	return http.get(baseUrl + '/common-problem/listAllAvailableSimple')
}